<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="theme-color" content="#f04848">
    <meta name="applicable-device" content="mobile">
    <meta http-equiv="Cache-Control" content="no-transform" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!--header_v2-->
    <link href="/static/zdm/commons.css" rel="stylesheet">
    <link href="/static/zdm/detail.css" rel="stylesheet">
    <title>{{ item.article_title|safe }}</title>
    <meta name="description" content="{{ item.article_summary|safe }}" />
    <meta name="keywords" content="{{ item.article_summary|safe }}" />
    <link rel="stylesheet" href="//img.ztm.me/weui/weui.css"/>
    <script>
        function getRem() {
            var $html = document.querySelector('html');
            var oWidth = $html.clientWidth || document.documentElement.clientWidth;
            if (oWidth > 750) {
                $html.style.fontSize = 750 / 10 + 'px';
            } else {
                $html.style.fontSize = oWidth * .1 + 'px';
            }
        }
        getRem();
        window.onresize = function() {
            getRem();
        }
    </script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-113208908-1"></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'UA-113208908-1');
    </script>
    <script type="text/javascript" src="//libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript" class="dialog js_show">
        $(function(){
            $('#messages').on('click', '.weui-dialog__btn', function(){
                $(this).parents('.js_dialog').fadeOut(200);
            });
        });
    </script>
</head>
<body>
    {% if request.user.is_authenticated %}
    <div id="dialogs">
        <div class="js_dialog" id="iosDialog2" style="display: none;">
            <div class="weui-mask"></div>
            <div class="weui-dialog">
                <div class="weui-dialog__bd">
                  <p id="img_p"><img src="/static/img/loading3.gif" alt="loading" /></p>
                  <p id="desc_p">请稍等...正在生成二维码分享海报</p>
                </div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">关闭</a>
                </div>
            </div>
        </div>
    </div>
    {% endif %}
    <header class="head_banner header-top fixed" id="J_header_top">
    <div class="header-in">
        <!-- 顶部白色logo -->
        <div class="header-white">
            <div class="logo-img">
                <h1 id="logo">
                    <a href="https://www.ztm.me/youhui/"><img src="/static/zdm/logo.png"></a>
                </h1>
            </div>
            <div class="logo-search">
                <i class="icon-search zm-icon-search-o"></i>
                <input type="text" name="search" placeholder="搜索商品" id="J_enter_search">
                <img src="/static/zdm/delete.png" class="icon-cancel" id="J_icon_cancel">
            </div>
        </div>
        <div class="header-tab">
            <div class="header-inner">
                <div class="channel-list">
                    <ul >
                        {% if not category %}
                            <li><a href="/youhui/" class="cur-tab">全部好价</a></li>
                        {% else %}
                            <li><a href="/youhui/">全部好价</a></li>
                        {% endif %}
                        {% if category == 'mu-ying-yong-pin' %}
                            <li><a href="/youhui/category/mu-ying-yong-pin/" class="cur-tab">母婴用品</a></li>
                        {% else %}
                            <li><a href="/youhui/category/mu-ying-yong-pin/">母婴用品</a></li>
                        {% endif %}
                        {% if category == 'dian-nao-shu-ma' %}
                            <li><a href="/youhui/category/dian-nao-shu-ma/" class="cur-tab">电脑数码</a></li>
                        {% else %}
                            <li><a href="/youhui/category/dian-nao-shu-ma/">电脑数码</a></li>
                        {% endif %}
                        {% if category == 'shi-pin-bao-jian' %}
                            <li><a href="/youhui/category/shi-pin-bao-jian/" class="cur-tab">食品保健</a></li>
                        {% else %}
                            <li><a href="/youhui/category/shi-pin-bao-jian/">食品保健</a></li>
                        {% endif %}
                        {% if category == 'ge-hu-hua-zhuang' %}
                            <li><a href="/youhui/category/ge-hu-hua-zhuang/" class="cur-tab">个护化妆</a></li>
                        {% else %}
                            <li><a href="/youhui/category/ge-hu-hua-zhuang/">个护化妆</a></li>
                        {% endif %}
                        {% if category == 'ban-gong-she-bei' %}
                            <li><a href="/youhui/category/ban-gong-she-bei/" class="cur-tab">办公设备</a></li>
                        {% else %}
                            <li><a href="/youhui/category/ban-gong-she-bei/">办公设备</a></li>
                        {% endif %}
                        {% if category == 'ri-yong-bai-huo' %}
                            <li><a href="/youhui/category/ri-yong-bai-huo/" class="cur-tab">日用百货</a></li>
                        {% else %}
                            <li><a href="/youhui/category/ri-yong-bai-huo/">日用百货</a></li>
                        {% endif %}
                        {% if category == 'tu-shu-yin-xiang' %}
                            <li><a href="/youhui/category/tu-shu-yin-xiang/" class="cur-tab">图书音像</a></li>
                        {% else %}
                            <li><a href="/youhui/category/tu-shu-yin-xiang/">图书音像</a></li>
                        {% endif %}
                        {% if category == 'jia-yong-dian-qi' %}
                            <li><a href="/youhui/category/jia-yong-dian-qi/" class="cur-tab">家用电器</a></li>
                        {% else %}
                            <li><a href="/youhui/category/jia-yong-dian-qi/">家用电器</a></li>
                        {% endif %}
                        {% if category == 'lv-you-chu-xing' %}
                            <li><a href="/youhui/category/lv-you-chu-xing/" class="cur-tab">旅游出行</a></li>
                        {% else %}
                            <li><a href="/youhui/category/lv-you-chu-xing/">旅游出行</a></li>
                        {% endif %}
                        {% if category == 'jia-ju-jia-zhuang' %}
                            <li><a href="/youhui/category/jia-ju-jia-zhuang/" class="cur-tab">家居家装</a></li>
                        {% else %}
                            <li><a href="/youhui/category/jia-ju-jia-zhuang/">家居家装</a></li>
                        {% endif %}
                        {% if category == 'fu-shi-xie-bao' %}
                            <li><a href="/youhui/category/fu-shi-xie-bao/" class="cur-tab">服饰鞋包</a></li>
                        {% else %}
                            <li><a href="/youhui/category/fu-shi-xie-bao/">服饰鞋包</a></li>
                        {% endif %}
                        {% if category == 'yun-dong-hu-wai' %}
                            <li><a href="/youhui/category/yun-dong-hu-wai/" class="cur-tab">运动户外</a></li>
                        {% else %}
                            <li><a href="/youhui/category/yun-dong-hu-wai/">运动户外</a></li>
                        {% endif %}
                        {% if category == 'wan-mo-le-qi' %}
                            <li><a href="/youhui/category/wan-mo-le-qi/" class="cur-tab">玩模乐器</a></li>
                        {% else %}
                            <li><a href="/youhui/category/wan-mo-le-qi/">玩模乐器</a></li>
                        {% endif %}
                        {% if category == 'qi-che-xiao-fei' %}
                            <li><a href="/youhui/category/qi-che-xiao-fei/" class="cur-tab">汽车消费</a></li>
                        {% else %}
                            <li><a href="/youhui/category/qi-che-xiao-fei/">汽车消费</a></li>
                        {% endif %}
                    </ul>
                </div>
            </div>
        </div>
    </div>
</header>
<div id="ch-mirrors"></div>

<input type="hidden" id="search_top_category" value="">
<div class="detail-banner">
    <img src="{% if item.qiniu_pic %}{{ item.qiniu_pic }}{% else %}//img.ztm.me/img/noimg.png{% endif %}" alt="{{ item.article_title|safe }}">
</div>
<div class="details-title details-title-haojia z-clearfix">
    <div class="grey ellipsis">
        <span class="mall">{{ item.article_mall }}</span>
        <span class="line"></span>
        <span class="time">{{ item.article_date }}</span>
        <span class="line"></span>
        <span class="author"></span>
    </div>
    <h1>{{ item.article_title|safe }}</h1>
    <p class="price">{{ item.article_price }}</p>
    <div class="go-link">
        {% if request.user_agent.is_mobile %}
            <a href="{% if item.commodity_url_refer_mb %}{{ item.commodity_url_refer_mb }}{% elif item.commodity_url_refer %}{{ item.commodity_url_refer }}{% else %}{{item.commodity_url}}{% endif %}" target="_blank">直达链接</a>
        {% else %}
            <a href="{% if item.commodity_url_refer %}{{ item.commodity_url_refer }}{% else %}{{item.commodity_url}}{% endif %}" target="_blank">直达链接</a>
        {% endif %}
    </div>
</div>
<article class="article">
    <h2 class="title-box"></h2>
    <p><p>{{ item.article_summary|safe }}</p></p>
    {% if item.article_content %}
    <blockquote><p>{{ item.article_content|safe }}</p></blockquote>
    {% endif %}
</article>
<!-- 分享二维码 -->
<div class="btn-open-app">
    <a href="javascript:;" class="J_ota" id="showIOSDialog2">生成海报分享给好友</a>
</div>

{% if request.user.is_staff and request.user.is_superuser %}
<div class="btn-open-app">
    <a href="javascript:;" class="J_ota" id="showIOSDialog3">生成固定二维码海报</a>
</div>
{% endif %}
<!--
<div class="baoliao-user">
    <p class="title">爆料人</p>
    <div class="info">
        <div class="avatar-wrap">
            <img src="https://avatarimg.ztm.me/default/2258522034/5af55b0fe50a1-big.jpg" alt="">
        </div>
        <div class="user-info">
            <div class="info-top">
                <span class="name">小小值机器人</span>
                <span class="level">LV5</span>
                <a href="https://m.ztm.me/app/?is_detail=1" class="go-focus J_ota" target="_blank" onclick="dataLayer.push({'event':'2110001'})">+ 关注</a>
            </div>
            <div class="info-bottom">
                <span>189136爆料</span>
                <span>0原创</span>
                <span>0评论</span>
                <span>2448粉丝</span>
            </div>
        </div>
    </div>
</div>
-->
<!-- 搜索浮层模板 -->
<div class="search-cover" id="J_search_cover">
    <!-- 搜索页头部搜索框 -->
    <form action="/youhui/" method="get" class="search-header" id="J_search_form">
        <i class="search-return zm-icon-arrow-left" id="J_search_close"></i>
        <div class="search-input" id="J_search_sug">
            <i class="icon-search zm-icon-search-o"></i>
            <input type="text" name="s" placeholder="搜索商品" id="J_search_input" >
            <img src="/static/zdm/delete.png" class="icon-cancel" id="J_search_clear">
        </div>
        <button type="submit" class="search-button" disabled="disabled" id="J_search_btn">搜索</button>
    </form>
    <div class="search-hot">
        <div class="hot-title">热门搜索</div>
        <ul class="hot-list">
            <li><a href="/youhui/?s=京东Plus&source=hot_keyword">京东Plus</a></li>
            <li><a href="/youhui/?s=历史低价&source=hot_keyword">历史低价</a></li>
            <li><a href="/youhui/?s=白菜价&source=hot_keyword">白菜</a></li>
            <li><a href="/youhui/?s=超值&source=hot_keyword">超值</a></li>
            <li><a href="/youhui/?s=双重优惠&source=hot_keyword">双重优惠</a></li>
            <li><a href="/youhui/?s=神价格&source=hot_keyword">神价格</a></li>
            <li><a href="/youhui/?s=绝对值&source=hot_keyword">绝对值</a></li>
            <li><a href="/youhui/?s=近期好价&source=hot_keyword">近期好价</a></li>
        </ul>
    </div>
</div>
<script type="text/javascript">
  $(function(){
      var $iosDialog2 = $('#iosDialog2');
      // 生成临时二维码
      $('#showIOSDialog2').on('click', function(){
          $iosDialog2.fadeIn(200);
          setTimeout(function() {
            document.getElementById("img_p").innerHTML = '<img src="https://www.ztm.me/weixin/share/post/?item_id={{ item.pk }}&qrcode_type=0" style="width:242px;height:277px;" alt="post" />';
            document.getElementById("desc_p").innerText = '长按海报并选择“发送给朋友”！';
          }, 1000);
      });
      // 生成固定二维码
      $('#showIOSDialog3').on('click', function(){
        $iosDialog2.fadeIn(200);
        setTimeout(function() {
          document.getElementById("img_p").innerHTML = '<img src="https://www.ztm.me/weixin/share/post/?item_id={{ item.pk }}&qrcode_type=1" style="width:242px;height:277px;" alt="post" />';
          document.getElementById("desc_p").innerText = '长按海报并选择“发送给朋友”！';
        }, 1000);
    });
      $('#dialogs').on('click', '.weui-dialog__btn', function(){
        $(this).parents('.js_dialog').fadeOut(200);
      });
  });
</script>
<script type="text/javascript" src="/static/zdm/commons.js"></script>
<script type="text/javascript" src="/static/zdm/detail.js?v=20190221"></script>
<script src="//img.ztm.me/weui/weui.min.js"></script>
{% if jssdk_signature %}
<script type="text/javascript">
    // var ua = navigator.userAgent.toLowerCase();
    // alert(ua);
    wx.config({
        debug: false,
        appId: '{{jssdk_signature.appid}}',
        timestamp: '{{jssdk_signature.timestamp}}',
        nonceStr: '{{jssdk_signature.nonce}}',
        signature: '{{jssdk_signature.signature}}',
        jsApiList: [
            'checkJsApi',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'hideMenuItems',
            'showMenuItems',
            'closeWindow'
        ]
    });
    // wx.ready(function () {
    //  document.querySelector('#closeWindowButton').onclick = function () {
    //     wx.closeWindow();
    //   };
    // });
    wx.ready(function(){
        // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
        wx.onMenuShareTimeline({
            title: '{{ item.article_title|safe }}', // 分享标题
            desc: "{{ item.article_summary|safe }}", // 分享描述
            link: 'https://www.ztm.me/youhui/detail/{{ item.id }}/?referrer={{ referrer }}',
            imgUrl: "https:{% if item.qiniu_pic %}{{ item.qiniu_pic }}{% else %}//img.ztm.me/img/noimg.png{% endif %}?imageMogr/v2/thumbnail/300x300" // 分享图标
        });
        // 获取“分享给朋友”按钮点击状态及自定义分享内容接口
        wx.onMenuShareAppMessage({
            title: '{{ item.article_title|safe }}', // 分享标题
            desc: "{{ item.article_summary|safe }}", // 分享描述
            link: 'https://www.ztm.me/youhui/detail/{{ item.id }}/?referrer={{ referrer }}',
            imgUrl: "https:{% if item.qiniu_pic %}{{ item.qiniu_pic }}{% else %}//img.ztm.me/img/noimg.png{% endif %}?imageMogr/v2/thumbnail/300x300", // 分享图标
            type: 'link' // 分享类型,music、video或link，不填默认为link
        });
        wx.error(function(res){
          alert(res.errMsg);
        });
    });
</script>
{% endif %}
</body>
</html>